//
//  CZLoadingCell.m
//  globalTranslate
//
//  Created by 陈镇 on 2025/8/12.
//

#import "CZLoadingCell.h"
#import "CZLoadingAnimationView.h"


@interface CZLoadingCell()
/** <#注释#>*/
@property (nonatomic, strong) CZLoadingAnimationView * loadingView;

@end
@implementation CZLoadingCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)didInitializeWithStyle:(UITableViewCellStyle)style{
    [super didInitializeWithStyle:style];


    

    
    self.loadingView = [[CZLoadingAnimationView alloc] init];
    [self.contentView addSubview:self.loadingView];
    
}

-(CGSize)sizeThatFits:(CGSize)size{
    
    return CGSizeMake(SCREEN_WIDTH, 36+20);
}

- (void)layoutSubviews{
    [super layoutSubviews];

    
    if(self.model.isChinese){
        self.contentView.frame = CGRectMake(self.headerView.right + 10, 0, 52, 40);
    }else{
        self.contentView.frame = CGRectMake(self.headerView.left - (52) - 10, 0, 52, 40);
    }
    self.loadingView.frame = CGRectMake(16, 18, 20, 4);
}


@end
